package com.ruoyi.platform.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.platform.mapper.ChatRecordsMapper;
import com.ruoyi.platform.domain.ChatRecords;
import com.ruoyi.platform.service.IChatRecordsService;

/**
 * 聊天记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-21
 */
@Service
public class ChatRecordsServiceImpl implements IChatRecordsService 
{
    @Autowired
    private ChatRecordsMapper chatRecordsMapper;

    /**
     * 查询聊天记录
     * 
     * @param chatId 聊天记录主键
     * @return 聊天记录
     */
    @Override
    public ChatRecords selectChatRecordsByChatId(String chatId)
    {
        return chatRecordsMapper.selectChatRecordsByChatId(chatId);
    }

    /**
     * 查询聊天记录列表
     * 
     * @param chatRecords 聊天记录
     * @return 聊天记录
     */
    @Override
    public List<ChatRecords> selectChatRecordsList(ChatRecords chatRecords)
    {
        return chatRecordsMapper.selectChatRecordsList(chatRecords);
    }

    /**
     * 新增聊天记录
     * 
     * @param chatRecords 聊天记录
     * @return 结果
     */
    @Override
    public int insertChatRecords(ChatRecords chatRecords)
    {
        return chatRecordsMapper.insertChatRecords(chatRecords);
    }

    /**
     * 修改聊天记录
     * 
     * @param chatRecords 聊天记录
     * @return 结果
     */
    @Override
    public int updateChatRecords(ChatRecords chatRecords)
    {
        return chatRecordsMapper.updateChatRecords(chatRecords);
    }

    /**
     * 批量删除聊天记录
     * 
     * @param chatIds 需要删除的聊天记录主键
     * @return 结果
     */
    @Override
    public int deleteChatRecordsByChatIds(String[] chatIds)
    {
        return chatRecordsMapper.deleteChatRecordsByChatIds(chatIds);
    }

    /**
     * 删除聊天记录信息
     * 
     * @param chatId 聊天记录主键
     * @return 结果
     */
    @Override
    public int deleteChatRecordsByChatId(String chatId)
    {
        return chatRecordsMapper.deleteChatRecordsByChatId(chatId);
    }
}
